using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using System.Reflection;


namespace P2.Cuberry.Framework.CalendarLibrary
{
    public partial class CuberryCalendarControl : UserControl
    {

        public CuberryCalendarControl()
        {
            InitializeComponent();
            //ChangeCellStyle();
            //this.dataGridView1.AutoResizeColumns(); !!!
        }

        
        string _currentLang = "En";
        public string CurrentLang
        {
            get { return _currentLang; }
            set { _currentLang = value; }
        }


        #region Define Variables

        EventHandler _OnXYClick = null;

        public event EventHandler OnXYClick
        {
            add { this._OnXYClick += value; }
            remove { this._OnXYClick -= value; }
        }

        string _warehouseCategory;
        public string WarehouseCategory
        {
            get { return _warehouseCategory; }
            set { _warehouseCategory = value; }
        }

        string _department;
        public string Department
        {
            get { return _department; }
            set { _department = value; }
        }
        
        int _subMenuItemID;
        public int SubMenuItemID
        {
            get { return _subMenuItemID; }
            set { _subMenuItemID = value; }
        }

        string _currentLanguage = "En";
        public string CurrentLanguage
        {
            get { return _currentLanguage; }
            set { _currentLanguage = value; }
        }


        string _dataControlName = "";
        public string DataControlName
        {
            get { return _dataControlName; }
            set { _dataControlName = value; }
        }

        #endregion


        public void ChangeStyle(String styleName)
        {
            //MessageBox.Show(styleName);

            try
            {
                DateMode d = (DateMode)Enum.Parse(typeof(DateMode), styleName);
                this.calendar1.DateMode = d;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                //Trace.WriteLine(ex.ToString());
            }
        }

        public void CalendarChangeDate(DateTime gotoDate)
        {
            this.calendar1.StartTime = gotoDate; // this.goToDatePicker.Value;
        }

        //paints and fills the DataGrid
        public void FillDataGrid(DataTable dtx) //sqlSearchString
        {            
           
        }

        


      


    }
}
